<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>page作用域的测试</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    测试page变量的作用域
    <% pageContext.setAttribute("name","zhangsan"); %>
    这是在当前页面中读取page的属性<br>
    <%=pageContext.getAttribute("name") %>
    <br>
   <jsp:include page="pageLvInc.jsp"/>
   <br>
   <h1>考虑include指令和jsp:include的区别，这个地方能用include指令测试么？</h1>
     <br>
     
     
       测试session变量的作用域
    <% session.setAttribute("name","zhangsan"); %>
    这是在当前页面中读取session的属性<br>
    <%=session.getAttribute("name") %>
    <br>
   <jsp:include page="sessionLvInc.jsp"/>
   <br>
   
          测试request变量的作用域
    <% request.setAttribute("name","zhangsan"); %>
    这是在当前页面中读取request的属性<br>
    <%=request.getAttribute("name") %>
    <br>
   <jsp:include page="requestLvInc.jsp"/>
   <jsp:forward page="requestLvInc.jsp"/>
   <br>

  </body>
</html>
